package com.neusoft.ch7.hw.test04;

public class TestDriver4Test04 {

	public static void main(String[] args) {
		test04();
	}

	private static void test04() {
		// 准备数据--初始化员工列表数组
		ColaEmployee[] colaEmps = new ColaEmployee[4];
		// 多态---父类指代子类
		ColaEmployee e0 = new SalaryEmployee("张三", 5, 5000);
		colaEmps[0] = e0;
		colaEmps[1] = new HourlyEmployee("李四", 8, 30, 150);
		colaEmps[2] = new SalesEmployee("王五", 7, 1000000, 0.01);
		colaEmps[3] = new HourlyEmployee("赵六", 4, 35, 170);
		
		////////////////////////////////////////////////
		// 创建公司类
		Company com = new Company();
		// 初始化赋值
		com.setColaEmps(colaEmps);
		// 打印指定月份的员工工资信息
		System.out.println("当前月份的员工工资信息：");
		com.printMothSalary4Employee(6);
	}
}
